package com.loe.test

import android.os.Bundle
import android.util.Log
import android.view.LayoutInflater
import android.view.View
import android.view.ViewGroup
import com.loe.mvp.BaseFragment
import com.loe.test.databinding.FragmentTestBinding
import kotlinx.android.synthetic.main.fragment_test.*

class TestFragment : BaseFragment()
{
    companion object { const val PATH = "/test/tf"}

    override val path get() = PATH

    override fun getLayout() = R.layout.fragment_test

    private val binding by lazy { FragmentTestBinding.bind(view!!) }

    override fun onCreated(savedInstanceState: Bundle?)
    {
        initEvent()
    }

    override fun onBus(msg: String)
    {
        toast(msg)
    }

    override fun initEvent()
    {
        binding.button.setOnClickListener()
        {
            toast("binding dfdfg水电费")
        }
    }

    override fun onDestroy()
    {
        Log.d("Runtime","$this: TestFragment被销毁了")
        super.onDestroy()
    }
}
